Skip to main content

Full text of "Yamaha YM 3812 Application Manual"

See other formats


12 


FM OPERATOR TYPE-L (OPLII) 


APPLICATION MANUAL 


CATALOG No.: LSI-2438124 
1994.6 


a 


eed 


TABLE OF CONTENTS 
1. OPLII 
Ps1. COV eL VIEW vce jasseccacesccs vciereas rast gnsivavrnroon ener ssi rteala pean tarot oeteaaneae Saaemenne toate mentee eT 
[<2 Features cccscrssssecsssnenesaccsssvcsvsncncanansenstasisseusannonvestentvossasenscnrneasaranerssoatarsonsransen ese ts rer" 
1-3 Overview of FM System........ccssescerssssesressssssssnrserncneaecrensanncnenensennesegess asec gern gee" 


2. Overview of Functions 
9-1] Main Functions .........:.:cesccsssceossscssesnrsssenssocenssenreseansannsoanees sean sesnasorenanencanceanensrenee ees 
2-2 Pin Layout | 
2-3 Description of Pin Functions 
FA Bus Control ccccasssecssssissvososrvaessrsaurssisenssnsanentenenntoncanpnasonannns senbneanaenenarnansnsnsvensnaneres 
4.5 Chanmels and Slots ..........:ccccsssscersencenrencenecnseansesssnsssnananaconsaacsenamsenncarensneassngseee i228 
9-6 Block Diagram ...........ccssssssceescesecesessesesseeessnscnenssnaseneanaranansnensonesssesesnereeneeeeeeeeeee9 
B27 GAPORG TRAD wiscsiesccessuceeorsnovsnanensaiaevsncvinennnnnnnsstino bs tinaniaentpvenacitansenannanarnsn sects ea NFOReest 


cryin ce Guislag Giga vale wou utauls sew anapauendaeawedenns sueuagns eoeesbetN EC tesa cae ea site teseerstase meer SS 


Sa vidielclus GUR ans sie sin pe¥s Sas cemide cape aesneese emecss eveens seinen esis Seeces see eessen” 


Jal Registers ......se-ssesvecsneerrsenecnsssnonvonseveennsensessousnosonenscrecansonsuunrancnnacenenaconennevensensense420e 
3-2 Phase Generator (PG) .......--sc-csersnsssssrstnsessescescnevsenssnanenornenesanncssansorvonssannersnneenenens 
3-3. Envelope Generator (EG)........ccssectessssreeseseenessnenctsneencensnsnennenssstee snes ee eee eens 
3-4 Operator (OP) and Accumulator (ACC) .......cccceeseeeescenesscnsseestenpeneesennncnsannenanans 
3-5 Status Information and Interrupt Sigmals..........-sssscereeceerreretetterseesnrereresessr ns 


4. Interfacing 
4-1 Generation of System ClOCK.........cccssreeseseetersesserstsenarenaennerenseesesenees 2 sass islenmsnailid 
4-2 Audio Output Interface 
43 Interface to Microprocessor/MicrocOmputer ......-.+sccecssssesreeretsenersercnscersnesseneenersee 


saa Wale TEC ede alnie oun Won eed sawsa Bera waseed tap ier nds e ee Sed Sem eee secese sees secewurncersernh try 


5, Creation of Music 
5-1 Concept of Sound Creation ........ssscserserscsesrenrerersssrneneananenennsnennneserensenen renee re 2 204 
5-2 Basics of Sound Creation 


ppaev'dunad eda bs cdbegedeusedisucnenuccessnncnegusceenserescovesesseneoueresossonnensnes® 


Kuaeu weep eoeaoe Seda We Keene wresheonacsseee Roun sgeeesadeew ime aregeecss ence’ el 


5-3 Example of Sound Creation 
5.4 Creation of Rhythm Sounds 


weeea ony Hae No ouled wan WOE Tea Tes Ts Heme Maw wNeens ees ren kes ees ex eeaconesteseeoseselsn ste 


6. Electrical Characteristics ............cscccsesececessseeteeseeseneenessearenssnnsnnennenanansaseesatyg gage 


7. Timing Diagrams 


Lice heddaadennsGsWseaseaecs aeaceearncanenen ned obauts cundycegesecensisccesedebaseesccsesnanesessec hoses 


pe EE EEE TATE 


1. 


1-1 
The FM Operator Type-LII (OPLID) is a new type of sound generator designed for use with Captain 


OPLII 


Overview 


systems and videotext systems. This device uses the same frequency modulation (FM) system used in 
our Music Synthesizer Yamaha-DX7 and other similar instruments. This allows for the production 
of a wide variety of sounds using software control. This sound generator is also equipped with functions 
for the production of rhythm sounds. This does not use the FM system, but instead creates sound 
through combining various sound frequencies, including white noise. 

The OPLII has also has a built-in low frequency oscillator for vibrato and AM effects, reducing the 
amount of programming required to produce special effects. 


* 


As this sound output from LSI is digital, a D/A converter such as YM3014 is necessary. 


Features 


FM sound generation system for realistic sound 

Mode selection of simultaneous voicing of 9 sounds or 6 melody sounds and 5 rhythm sounds 
Built-in vibrato oscillator/amplitude modulation oscillator (AM) 

Composite sine wave speech synthesis also possible 

input/output TTL compatible 

Si-gate CMOS-LSI 


5V single power supply 


1-3. Overview of FM System 


FM refers to Frequency Modulation and is a system using combinations of the higher harmonics 
created by modulation. This allows for the generation of waveforms containing high harmonics and 
non-harmonic sounds using circuitry which is relatively simple. The correspondence between the 
modulation index and spectrum distribution of higher harmonics is extremely natural allowing for 
production of a wide range of sounds from natural instruments to electronic sounds. 

The following formula (1) expresses the four parameters relevant to FM sound generation. 


F = Asin(oct + Isin omt) (1) 


Where A is the output amplitude, I is the modulation index, and wm and we are the frequencies of 
the carrier and modulator respectively. Formula (1) can also be expressed in the following manner : 


F=AfJo(Isin act + J1(1) {sin(oc + om)t — sin(@c — @m)t} 
+ J2(I){sin(@c + 2em)t + sin(@c — 2am)t + .....] (2) 


Jn (I) is a type 1 Bessel function of the n series. As (2) indicates, the amplitude of each of the harmonics 
is expresed by the Bessel function of the modulation index. Formula (1) indicates that FM sound 
generation is highly effective for combining special music and sound effects. This is not a string- type 


sound source which does not provide an even distribution of higher harmonics. The feedback FM 


of this system is shown in (3) below : 
F= Asin(oct + BF) (3) 


Where 8 .is the feedback factor. This feedback RM is also possible by string-type sound generation 
where the higher harmonic spectrum is a sawtooth wave. 


The following three function blocks are necessary for FM sound generation : 


a. Phase generator (PG) to generate ot 

b. Envelope generator (EG) allowing for amplitude A and modulation index to be expressed 
as time functions 

c. Sin table (sin) 


Combining these three elements into a single allows for configuration of the FM system shown in 
Fig. 1-1. Thus, if the concept of these units (operator cells : OP) is used, FM sound generation is a 
matter of setting the frequency and EG parameters within the units, and then combining the data 
between units. 


Fi) 


b. F(t)=AiSEN ott + A2SIN w2t c. F(t)}=A SIN (at+ BFW) 


Fig. 1-1 FM sound generation using unit cells 


4. Overview of Functions 


2-1 Main Functions 


The OPILL is equipped with a total of three voicing modes : nine sound simultaneous voicing 
mode, 6 melody/5 rhythm sound voicing mode, and composite sine wave speech synthesis mode. Each 
of these modes can be selected by software. 


a) 9 sound simultaneous voicing mode : 
This mode allows for simultaneous voicing of nine FM sounds having different voices. Both 
the rhythm bit (R) and speech synthesis bit (CSM) must he set to mF 


b) 6 melody/5 rhythm sound voicing mode : 
When the OPLII is set to this mode, the number of melody sounds which be simultaneously 
voiced is reduced by three to six, but five rhythm sounds are added (bass drum, snare drum, 
tom tom, top cymbal, and high hat cymbal). The bass drum is created using FM sound gen- 
eration, the tom tom by sine waves, and the other three rhythm instruments are simulated by 
composite frequencies. This mode is effective when connected to Captain or similar systems 
using text. 


c} Speech synthesis mode : 
Speech synthesis using the OPLII is by the composite sine wave speech synthesis method. Voices 
are simulated using 3 to 6 sine waves and pitch. : 


In addition to the above voicing modes, the OPLH is also equipped with a built-in vibrato oscillator 
and amplitude modulation oscillator. These effects can be used to create a sound which closely simulates 
the sound of natural instrumnents. Inclusion of these functions allows for a reduction is required 
programming. The OPLII also has both a long and short timer allowing for use as reference signals 
for scanning of key switches and tempo clock. The short timer can be used as a pitch generator for 
composite sine wave speech synthesis. 


2-2 Pin Layout 


< 
2 
3 
8 
z 


osy 


2 
3 
4 
WR [5 
6 
7 
8 
9 


— 
o 
7) 
> 


D; * NC : Ne Connection 


TOP VIEW(24pin DIP, 24pin SOP) 


2-3 
a) 


b) 


Description of Pin Functions 


oM 

Master clock for OPLII 

oSY:SH 

Clock needed for converting digital output of OPLII into analog signals (PSY) and syncron- 
ization signal (SH). These signals allow for direct connection to the YM3014 D/A convetor. 


Do~D7 

8 bit bidirectional data bus. 
CS:RD-WR:A0 

Control data bus comprised of Do~ D7. 


Write address of register to OPLII 


Write contents of register to OPLII 


Status of OPLII is read. 


Data of data bus Do~ D7 not assured. 


Set data bus Do~Dr to high impedance 


e) 


g) 


h) 


i) 


IRQ 

Interrupt signal sent from either of two timers. When the time programmed for the timer elapses, 
driven to low level. Interrupts can be masked by program. 

IC 

Clears the contents of all registers of OPLII, and initializes OPLH. 

MO 

Outputs music or audio signal converted into 13 bit serial signal. D/A convertor (YM3014 
or equivalent) is need for converting this digital output signal into its analog equivalent. 
GND 

Ground pin 


Vee 
+5V power supply pin 


bd 


2-4 


Bus Control 


Data bus control for reading and writing addresses and data of the registers of the OPLII is 
performed by the CS, WR, RD, and AO signals. The following four modes can be set according to 
the state of this four signals. 


a) 


b) 


c) 


d) 


e) 


Table 2-1 Mode Selection 


Inactive mode 
Address write mode 


Data write mode 
Status write mode 
Inhibit 


Inactive mode: 
When level of CS is “1”, the data bus Do~ D7 has high impedance. 


Address write mode : 

When an address is to be written, the control signals are set to the address write mode and 
the address data is set in the data bus. The address of the designated internal register is set 
and data can be written. It should be noted that after address data has been written, 12 cycles 
of the master clock (¢M) must elapse before music data is written. 


Data write mode : 

When the control signals are set to the data write mode, the data of Do~D7 (data bus) is 
written to the register having the designated address. A wait period is also required after a 
data write, in the same manner as an address write. In this case, the wait period is 84 cycles 
of the master clock ($M) before the next data or address is written. 


Status read mode : 

Setting the control signals to this mode allows for output of the status information stored in 
the status register of OPLII. , 
Inhibit : 

The data of the bus is meaningless when the control signals are set to this mode. Control of 
this data is not possible. 


The following precautions must be taken regarding the address and data write modes. 
When an address or data is written to an internal register of the OPLII, the following wait period is 
required before the next operation is performed. The period varies between the address write and data 
write modes. The CPU generates the wait period shown in Table 2-2 for the OPLII. Data integrity 
cannot be assured is this wait period is ignored. 


Table 2-2 Wait period 


ec 
Address write mode 12 cycles 


Data write mode 84 cycles 


Note: The indicated number of cycles for the wait period 
is the number of master clock cycles. 


- eee ee 


oo 


2-5 


Channels and Slots 


The OPLII is capable of voicing 9 FM sounds (9 channels). Each of these sounds has two operator 
cells. There is, however, actually one operator cell for the system, and thus the signal must pass through 
this operator cell a total of 18 times for 9 FM sounds. The order (slot number) which channel signals 
pass this operator cell corresponds to the register numbers. Voicing control of the various sounds ts 
possible through control of the registers corresponding to the slots. 

The F-number data for each channel! controls two slots. 

The relationship between these two slots (first slot and second slot) in the FM modulation mode 
is such that the first slot is always the modulating wave, and the second slot is the carrier wave. This 
first slot can also be set to the FM feedback mode. Refer to (2-1-9) for settings in this mode. 

The relationship between channels and slots is shown in Table 2-3. 


2-6 


[fo [e[s tela] ss [ro]osfs2] 3/1415} s6] se 
a[s[r|zfofets|elelsto|z]s[o]7fel> 


eye de dete del 
ass [alow coo 
ciferlefelcle 


Table 2-3 Channels and Slots 


Slot number 


Channel number 


Slot number for each channel 


Relationship between data for each slot and 
registers (ex. $20~$35) 


Relationship between data for each channel 
and registers (ex. 3CO~$C8) 


es 
sees xxx 


Block Diagram 
AO CS RD WR eM @SY SH TRO 
— 
6 MO 
Do~ D7 Register array 


2-7 Address Map 


ADDRESS D7 Dé Ds Ds D3 In Di Do 


01 


Status registers 


Dr De Ds Da Di D2 Di_ De 


FLG|FLG 
Ti] T2 


COMMENT 


a 


TEST DATA OF LSI When the value is “0”, Ds is 
DATA GF TIMER-1 compatible with YM3526. 
DATA OF TIMER-2 

IRQ-RESET/CONTROL OF TIMER-1,2 

CSM SPEECH SYNTHESIS MODE/NOTE SELECT 


AM-MOD/VIBRATO/EG-TYPE 
KEY-SCALE RATE/MULTIPLE 


A 


KEY-SCALE LEVEL/TOTAL LEVEL 


A 


ATTACK RATE/DECAY RATE 


A 


SUSTAIN LEVEL/RELEASE RATE 


a 


KEY-ON/BLOCK/F-NUMBER 


DEPTH(AM/VIB)/RHYTHM(BD, SD, TOM, TC, HH) 


FEEDBACK/CONNECTION 


ee 


WAVE SELECT 


on 


aa 


3. Description of Operation 


All functions of the OPLII are controlled by data written from the microprocessor to the register 
array. The shape of the envelope for music, modulation factor, frequency, voicing, mode, and other 
parameters are determined according to the data which is written to the registers. Data can be combined 
to generate the sound of a piano, violin, or other instrument. There is an extremely large number of 
combinations with a high degree of complexity. This chapter deals solely with the function of the various 
registers. Refer to the chapter on creating music for details on the various possible combinations. 


3-1 = Registers 


The registers comprise an area of 777 bits as shown in the address map of 2-7. The addresses in 
this diagram are the subaddresses allocated to the various registers in the OPLII. Music data is written 
to the internal registers through these subaddresses. Thus, data is stored in the OPLII by first sending 
the subaddress data which will hold this data, and then sending the music data itself. When the same 
subaddress is to be accessed a number of times, the subaddress data need only be sent in the beginning. 
Music data can then be sent, without address data, to update the data. 
The initial setting for all registers is “Q” (initial clear = “O”). ) 


3-1-1 Test : Address ($01) 


The only use of this address is for testing of the LSI device by Yamaha. 
The bits are normally all “0”. The D5 bit, however, has a special meaning. The output waveform can 
be controlled by setting this bit to 1. (Refer to 3-1-2) 


3-1-2 Timer 


There are two timers: Timer | which has a resolution of 80ps and Timer 2 which: has a resolution 
of 320s. Starting, stopping, and flag contro! of both timers is possible. When a timer flag is set, the 
IRQ pin is driven to low level, and the microprocessor is notified of a timer interrupt. 


i) Timer-1 : Address ($02) 
Timer 1 is an 8 bit presettable counter. If an overflow occurs, the flag 1s set, and the preset 3 
value is loaded. In addition to normal timer functions, Timer 1 is also used for control of 
composite speech synthesis. When an overflow occurs in this mode, all slots are set to Key-ON 
(voicing), and then immediately to Key-OFF. This operation allows for composite speech 
synthesis. 


$02 D7 De Ds Da D3 D2 Th Do 


Tov(ms) = (256-N1)+#0.08 @eM =3.6MHz 
Ni= D702? + De*26 +...... +Dit2+Do 


ii) Timer-2 : Address ($03) 
- ‘Timer 2 is an 8 bit presettable counter like Timer 1. The diference between the two timers is 
that the resolution of Timer 1 is 80ps, and the resolution of Timer 2 is 320ps. 


$03 D7 De Ds Da Ds D2 Mi Do 


Tov(ws) = (256-N2)#0.32 @oM = 3.6MHz 


No = D7027 + Dor2* + |... +Di+#2 + Do 


iii) Timer Control : Address ($04} 
This register is used for start, stop, and flag control of Timers ! and 2. These operations are 
controlled by the bit state of Do, Di, Ds, De, and D7. 


& 
Me 
ws 
< 
2 


Do (STi) : Controls starting and stopping of Timer 1. 
When this bit is “1”, the preset value is loaded into Timer 1, and counting started. 
When this bit is “0”, Timer 1 does not operate. 


) D1 (ST2) : Performs the same operation as Do (ST1) for Timer 2. 


Ds (MASK T2) : When this bit is “1”, the flag for Timer 2 is masked (always “0”), and has no 
effect on operation of Timer 2. 


De (MASK 11) : This bit masks the flag for Timer 1. 


) D7 (IRQ RESET) : Resets the flags for Timers | and 2. 
When the D7 bit is set to “1”, the data of Do~Ds is ignored, and the D7 bit is auto- 
matically reset to “0”. 


3-1-3 CSM Mode/Keyboard Split : Address ($08) 


This register sets the mode to the music mode or speech synthesis mode, and determines the keyboard 
split for keyboard scaling of rate. 


$08 De|Ds D4 Ds D2 Di Do 


NOTE SEL 


De (NOTE SEL) : This bit controls the split point of the keyboard. When “0”, the keyboard split 
is the second bit from the most significant bit (MSB) of the F-Number. The MSB of 
the F- Number is controlled when “1”. This is illustrated below. 


Octave 


Block data 
F-Num’MSB 
F-Num‘2nd 


Keyboard split number 


Octave 
Block Data 
F-Num‘MSB 
F-Num2nd 


Keyboard split number 


* DON’T CARE 


D7 (CSM) : The composite sine wave speech synthesis mode is selected when “1”. All channels 
must be in the Key-OFF state when this mode is selected. 


3-1-4 AM/VIB/EG-TYP/KSR/Multiple : Address ($20 ~ 35) 


This register controls the multiple for the conversion of the frequency data given by the envelope 
shape and F-Number into carrier and modulating wave frequencies corresponding to the frequency 
components of music. 


$20~3$35 


fos [b:[b [dsb D:_De 


11 


Do~Ds3 (MULTIPLE) : The frequencies of the carrier and modulating waves are controlled by the 
multiples shown in Table 3-1. 


} < Example > 
Frequency of F-Number of 
Multiple for carrier wave 
Multiple for modulating wave 7 


F(t)=Esin (oft + Isin(7oft)) 


— 


Table 3-1 Multiples 


MUL | Multiple | MUL 


4 


Multiple 


Multiple 


oo 


Ds (KSR) : This bit gives the key scaling for the rate. 
The leading and trailing edges (attack and decay) of the sound of natural instruments 
tends to increase as the interval becomes higher. Key scaling of the rate allows for a 
simulation of this phenomenon. Table 3-2 shows the value of the offset which is added 
to the speed for each the intervals. Thus, the actual rate for ADSR (attack, decay, sustain, 
) and release) becomes the rate set for each with the indicated offset added. 


RATE= 4#R + Rks. 


© R is the value set for ADSR 
© Rks is the key scaling offset value 
© The RATE=0 when R=0 


* Nis the key scaling number 


12 


Ds (EG-TYP) : Switches between connecting sound and diminishing sound. 
A diminishing sound is selected when Ds=“Q”", and a connecting sound is selected 


when “1”. The difference between these two voicing modes lies in the use of the release 
rate. This is illustrated in Fig. 3-1. 


Ds =“0” Diminishing sound Ds=“1” Continuing sound 


DR DR 


SL SL 


Key-ON Key-ON Key-OFF 


AR=ATTACK RATE DR=DECAY RATE 
$L=SUSTAIN LEVEL RR=RELEASE RATE 


Fig. 3-1 Two Types of Voicing Modes 


De (VIB) ; ON/OFF switch for vibrato. Settting this bit to “1” causes a vibrato effect to be applied 
to the slot. The frequency for this is 6.4Hz (@ ¢M=3.6MHz), and the depth of the 
vibrato is determined by VIB-DEPTH of the BD register. 


D7 (AM) : ON/OFF switch for AM modulation. Setting this bit to “1” causes AM modulation to 
be applied to the slot. The frequency for this is 3.7Hz (@ oM = 3.6MHz), and the depth 
of the vibrato is determined by AM-DEPTH of the BD register. 


3-1-5 KSL/Total Level : Address ($40 ~ $55) 


The total level is used to control the modulation factor (voice) and volume for the output of the 
envelope generator. Level key scaling (KSL) is similar to rate key scaling. This allows for simulation 
of the tendency for the output level of natural instruments to decrease as the interval increases. 


[D7 Ds|Ds D4 Ds D2 Di De 


Do~Ds (Total Level) : The minimum resolution for attenuation is 0.75dB, and the volume can 
attenuated by a maximum of 47.25dB. 


$40~$55 


13 


Tabte 3-3 Total Level 


ee 


Ds Ds D3 Dz Di Do 


24 «12 6 
F Degree of attenuation 3001S 0.75 


dB dB @B dB dB 4B 


De~ D7 (KSL) : Bits for control of level key scaling. 
The key scale mode attenuates the level as the interval increases. The degree of atten- 
uation can be set as 0 (no attenuation), 1.5dB/octave, 3dB/octave, or 6dB/octave. 


Table 3-4 


Degree of Attenuation 


RE ne fr eee sae naa ee eee ------- I------- =I-----+-- 1 
mr pr bt or 2 8 3 + 4 « S&S t 6 2 F 3 
} jo a oe a oe oe ee wf @ 2.8% 4 
[on--NM----- ey o---5-+- teen taelanaaae SS Ceca | 


I 0 1 9.008 T 0,00 I oud T o.00% To. 000 7 9.000 I o.000 1 9,000 T 
I 0,000 IT 0,000 1 0. ean IO, Oboe 1 o.oco T Of. 000 I ooo) L 6,000 7 


es Ce ais Oe ee er. I aE AE 


1 | I 0,000 1 9,000 T 0.000 IT o,000 T G00 T 5.000 1 0.000 1 6.900 I 
I I 0.9000 1 0.750 I |. 125 I 1-800 1 1.875 1 2,250 § 2.6275 I 3.000 I 


[onna- lan enn ns Coraline Cocaine [----46--[e--- a | 


t 2 I o,.000 1 «9.000 T o.000 1 o.006 T 0,606 I 4.125 1 1.875 1 2. 625 I 
I I 3.000 I 3.750 I 4. 125 1 4.500 1 46.875 1 5.250 1 S.625 1 6.000 I 
I----" I+------~" l-----" wejyerrcee [oss foes 35 t- | -20 een lane I 
I I o.ooo LL G.oun 1 000 L 1.975 1 3.000 1 & 125 1 4.875 1 5S. 625 1 
1 3 1 §.000 1 6.750% 7.125 1 7.500 1 7.875 1 6.250 1 @,625 1 3.000 I 
I----- 1-------- {----+--- [-------- ta----4n- I-------" 1-------- Jo-w =n [-------~ 1 
) I I vw. ogg To, bod xy 3.000 JT 4. B75 1 6.008 . 7.225 1] 7.075 1 8.625 [ 
1 4 2 3.000 1 9.750 1 10,125 71 10. 500 110,875 1 11.259 1 11,625 1 12,000 1 
1----- J-<------ Y+------- [-----~-- [-------- I-------~- [~------- I-------- I-------- I 
I 5 I Ooo TL B.mo 6.000 © 7.875 TF 3,000 1 10,1285 § 10.875 1 11.625 1 
1 1 12.000 I 12.750 T 15.125 113.503 1 17,975 1 14 250 1 14.625 I 49.000 I 
\----- [-~<----—- iow [-------- \ernenco- l--+----~ leer foro [oe--- == t 
1 5 I 06.000 I Bond Y B.ueo To id. @75 1 12.000 1 13.125 1 1Z.975 1 14.625 I 
I t 15.000 1 15. 750 416.125 1 16.500 $ 16.875 1 17.258 | 17.625 1 18.a00 I 
F aecombaataal lernrerr t--<2---~-" ]-------"- {--"<e<c= [oseeres— {-------- \------7- |----c--r" I 
I 7 1 o.000 F 3. ooo To ized lo ls. p75 1 15.000 116,125 1 16. 975 1 17.625 ! 
I 1 18.00 1 18.750 i 49. 125 1 19.500 1 19,875 7 20,750 1 20.625 1 21.000 I 
1----- t-------" J--"----- {---e--77 , a aaaian a Lesa meiner Lees ated {-corcce i 


Unit : dB 


Note: + F-Number is the value of most significant four bits 
» 1.54B is 1/2 of above 
» 6dB is twice above 


14 


3-1-6 Attack/Decay Rate : Address ($60 ~$75) 


The attack rate sets the rising time for the sound. The decay rate is the diminishing time after the 
attack. The time settings for each of these rates are shown in Table 3-6. 


$60 ~$75 


D7 De Ds D4a| D3 D2 Dm hm 


AR DR 
oP 2F) Ze ae ae” ea ae 


3-1-7 Sustain Level/Release Rate : Address ($80 ~ $95) 


For continuing sounds, the sustain level gives the point of change where the attenuated sound in 
the decay mode changes to a sound having a constant level. For diminishing sounds, the sustain level 
gives the point where the decay mode changes to the release mode. 

For continuing sounds, the release rate defines the rate at which the sound disappears after 
Key-OFF. For diminishing sounds, the sustain level indicates the attenuation prior to reaching the 


sustain level (point of change) while the release rate indicates the attenuation after the sustain level 
is reached. 


$80~S$95 


D7 De Ds D4} D3 D2 Di Do 


DR 


dB dB dB 4B|2* 27 2' 2° 


“93dB when bits Da~D7(SL) are all “1”. 
* The attenuation time for the release rate is the same as 
that shown in table for decay rate. 


15 


Table 3-6 Attack and Decay Times for Various Rates 


The rates indicated below are those after key scaling. The rate value is obtained by taking 
the most significant four bits (RM) and subtracting the least significant two bits (RL) 
(RM-RL). RATE = RM*4 + RL 


eee EG ATTACK TIME +4 wee EG DECAY TIME *0% eee EG ATTACK TIME #44 «ee EG DECAY TIME »** 


RATE ms RATE ms RATE ws RATE pee 
(@ 10% - 90% } (@ OdB - 36GB } 
is = is 3 0. 00 is 3 2.40 
15 3 0.00 15 3 o.51 : 
1% z 0. 00 15 2 2,40 
15 2 D.00 15 2 0.51 
, 151 0.00 151 2.40 
{51 0, 00 iS 1 o. St . 
race aes ans aoa 15 6 0,00 15. 6 2.40 
14 3 O11 14 3 0.58 aie o. 20 14 5 2.74 
1a 2 O.13 14 2 0.63 14 2 +26 14 2 3.20 
ie ees . ee oe 14.1 o.3e 14 1 4 
. 140 Oo. 28 14 0 4.80 
44 0 0.19 14 6 1.01 ; : 
4 13 3 O42 13 3 5.48 
13 3 0.22 1% 3 1.15 . 
13 2 0. 26 1s 2 6.40 
13 2 O. 26 13 2 1.25 : 
: tz 1 a, S6 131 7.68 
131 o.731 131 1.62 a 
> 13.4 0. 7G 13 0 9.66 
120 0.37 13.0 2.02 
iz 3 0.80 12 3 10. 96 
123 0. a3 12 3 2.32 
12 2 0. 92 12 2 12. 80 
iz2 0.43 iz 2 2.68 : 
tz 1. tz 1z 1 15.35 
121 0.61 iz 1 3.22 5 
iz a 1.40 12 0 13. 20 
iz 0.73 iz 0 4.02 
‘ ik s 1.56 11 3 21.92 
11 3 0. 8S 11 3 4.62 Z 
11 2 1.84 11 2 25. 56 
ii 2 0. 37 41 2 5.28 
111 2.20 42 4 30.68 
14 1 1.45 ait 6.42 
110 2.76 11 0 38. 36 
11 0 1.45 110 a,c 
10 3 3.12 10 3 43. BA 
10 3 1.70 10 3 3.24 
10 2 3.6B 10 2 51.12 
id 2 1. 9% 10 2 10. 76 ; 5 
1% 2 4.40 1G 1 61.36 
10 1 2.26 10 1 12.64 
19.9 S. 52 10 0 76.72 
40 0 2.99 19 0 15.04 
93 &. 24 a3 87.68 
33 3.39 33 15.48 
; 92 7.76 32 102. 24 
92 3.87 22 21.52 
91 a. 90 $1 122. 72 
31 4.31 31 25.68 
30 11.04 30 153.44 
30 5.79 a0 22.08 2 
° a3 12. 4B BS 175.36 
et 5.78 BS 56.36 = a 
a2? 14, 72 B2 204. 48 
a2 7.74 a2 43, 04 
Bi 17.60 Bi 245.44 
a1 3. 012 al 31.3 
80 22.08 Bo 306. 6 
80 11.58 50 Ba. 16 - 
7% 13.57 mae 73.42 cae 24. 36 73 350.72 
: z 72 23. At 72 408, 96 
72 15.49 72 BE. 08 
: 71 35. 20 71 490. 89 
74 19.05 74 102.72 if 
oh ae 8 eae 70 46.16 70 G13. 7€ 
23. abe & 3 49. 92 & 3 701.44 
63 27,14 &3 147.84 si 
& 2 59, 688 6 2 @17.92 
& 2 30. 98 62 172.16 
6 i 36.10 6 ti 205.64 pode Fn Se 61 981.76 
wi 205. Bo BB. 32 6 0 1227.52 
& 0 46.54 ran) 256. BG 
ides 53 99. B4 53 1402.88 
53 $4.27 5 3 295.68 
52 51.35 sz Baa. 32 ae eis S2 1655. Be 
51 72.13 51 410. BB = 4 140. BO 3 1963.52 
50 176. 64 50 2455. 04 
so 92.67 50 513.268 
is inaicBe ae en xe 43 199, 68 43 2805. 76 
Rs igen ne oan Bi 42 235. 52 42 3271.68 
a1 144.38 a's 621.76 a4 281.60 41 3927.04 
a 4 40 352.28 40 4919. 068 
a0 185.34 40 1026. 56 ae cae tk 
33 217-03 a: 1182.72 : ve ad 5611.52 
ee ge = 5 jaan oh 32 471.06 32 5543. 36 
31 288.77 34 1643.52 age S63. 20 31 7654. 08 
30 370.63 30 2053.12 ie 705-56 “f eS 
——_ ces th =e aga 2 798, 72 23 11223.04 
22 495.62 22 2754.56 a $42.08 22 15006. 72 
21 577.54 21 3287.04 =. 1126.40 21 {5708.16 
zo 74ai.38 20 4106, 24 20 1413.12 206 19640, 32 
is 268.35 t > 720,98 is 1537.44 13 224466. 08 
12 991.25 i< S504. 12 1¢ 1684.16 12 26173.44 
ti 115%, 07 41 6574.00 11 2252. BO a. 31416.32 
10 1482.75 10 B212. 48 io 2826. 24 10 =~%39260.64 


Note: There is no change in the envelope when the rate is “0”. 


3-1-8 Block/F-Number : Address ($A0 ~ $B8) 
Data for determining the interval and scale. The F-Number is determined by both the $A* and 


$B* registers. 


$A0~$A8 ©|D7 De Ds Da D3 Tr 
F-Number 
QP 9 
$B0 ~$B8 


Do~D7($A*), Do ~ D1 ($B*) (F-Number) : The F-Number is indicated by the total of ten bits formed 
from the 8 bits of the $A* register and lower two bits of the $B* register. The data 


of the F-Number gives the scale. This value is determined by the procedure outlined 
below. 


D2~Da4 (BLOCK) : Gives information on the octave. 


Ds (Key-ON) : Bit corresponding to ON/OFF of the keyboard. When this bit is 1”, the channel 
is ON and voiced. Key-OFF when “0”. 


* F-Number/Block 


With the OPLII, the required frequency can be obtained by giving the phase increment corre- 


sponding to this frequency. This increment is determined by the F-Number, Block, and Multiple in- 
formation. 


First, the increment of the desired frequency is obtained. This is given by the formula shown below. 
AP =fmus*2!9/fsam fsam = fM/72 a TD 
fmus_ =: desired frequency 
fsam : sampling frequency (SOkHz) 
{M : frequency of input clock (3.6MHz) 
The above allows for the phase increment to be obtained. As many of bits would be required to 


express this value, only the data for a single octave is given, and this increment is shifted for each 
octave (2x, 4x .....). This aliows for expression of the increment in the following manner. 


17 


More 


AP = 284F’*MUL 


B : octave information 


r : increment limited to a single octave 


MUL : Multiple data 


Formulas @ and @ permit the increment (F’) to be expressed in 10 bits. The F-Number and 


Block can be expressed as follows. 
F =(fmus*2!9/fsam)/2°-* 


F : F-Number data 
b : Block data 


Table 3-7-1 F-Number (1) 


Frequen 
sconce F-Number 
{4oct) 
; 363 


LThZ 


1 


1 1 


=e ew et OG Seo & & 


\ 
I 
I 
i 
I 
1 
\ 
| 
' 
| 
I 
t 
I 
! 
\ 
| 
\ 
| 
! 


— = © 2 CoO OF mere = 


Frequency 
(4~ Soct) 


@MUL=1 


oor, wf OS SC 


[el 


a 


ws oOo So fo + 


eerooerwoor ee 9 


0 
0 
1 
a 
1 
0 
1 


—_— & ee & 


ceconmpeocooaesecemlmr nt 


aecocoreroes ec 9 © 


$A* 
Da Ds 


0 
1 
0 
I 
0 
U 
0 
0 
0 
0 
1 


— 


eooeocoomdtroo ¢ 


mw = OS ocr oso 


ewe ep ODS SF 


oeroooo - 


-—_e wre ooeoewerseosdes- 


De Di 


- ooo = Fe ee me OO 


$B* ! $A¥ 
Di Dol D7 De Ds Ds Da D2 
6 1 1 0 1 0 


Di Do 
] 


Do 


eoocor ss? 


if 


id: 
| } 
3-1-9 Feedback/Comnection : Address ($CO~$C8) 


This register determines the modulation factor for self-feedback and the type of FM modulation. 


CONNECTIO 


Do (CONNECTION) : Connection controls the manner in which two slots are connected. The FM 
modulation mode is selected when the data is “0”. The two slots are connected in parallel 
for sine wave output in the composite mode when the data is “1”. i 


yee Fe 


— 


OUT 


Di~Ds3 (FEEDBACK) : Gives the modulation factor for feedback FM modulation of the first slot. 


Table 3-8 Modulation Factor 


Cece Ft ae ee 


19 


3-1-10 AM VIB-Depth/Rhythm : Address ($BD) 


This allows for control of AM and vibrato (VIB) depth, selection of rhythm mode, and ON/OFF 
control of various rhythm instruments. 


ole ag op lim a i 


Do~Ds (RHYTHM) : The OPLII is set to the rhythm sound mode when Ds=“1”. Channels 
7 ~9 (refer to page 9} are the channels for rhythm sounds. Thus, music (melody section) 
! is limited to 6 sounds. Do~Ds allow for ON/OFF control of the various rhythm in- 
struments. This means that the $B6, $B7, and $B8 Key-ON registers must always be 
“9”, Slots [3~18 correspond to the rhythm sounds shown in Table 3-9. Data such as 
rate must-be input as a value appropriate to each rhythm sound. 


Table 3-9 Rhythm Slot 


De (VIB-DEPTH) : The vibrato depth is 14 cent when De =“1", and 7 cent when “O's 


D7 (AM-DEPTR) : The depth for AM is 4.8dB when D7=“1”, and 14B when D7= “0”. 


3-1-11 Wave Select 


When bit Ds of address $61 is “9” the OPLII is fully compatible with YM3526 (OPL); there are 
no differences between the two devices. If a sine wave is input in this mode, the output will be a sine 
wave like the input. When bit Ds of address $61 is “1”, the input sine wave will be output as the distorted 
wave shown in Table 3-10. 


D7 De Ds Da Ds D2 


ea 


$E0~SF5 


Table 3-10 Wave Select 


ages 
3-2 Phase Generator (PG) 


The phase generator is a circuit which obtains a phase value corresponding to the required frequency 
through accumulation of the increments for each unit of time. This increment is created from the 
frequency information (F-Number, Block, and Multiple) sent from the registers. This circuit is also 
equipped with a vibrato generator allowing for creation of a vibrato effect through combining the 
output of this generator and frequency information. 


3-3 Envelope Generator (EG) 


The envelope generator controls the rates for attack, decay, and release, sustain level, total level, 
etc. These parameters give the changes in voice and level which occur over time. The dynamic range 
of the envelope generator is 96dB (resolution of 0.1875). Indication for the envelope generator is 
logarithmic or in terms of degree of attenuation. The basic envelope shape is shown in Fig. 3-2, The 
special characteristics of this shape is that the change in level during the attack is exponential while 
it is linear during the other sections of the envelope. The crossover from attack to decay occurs at 
the OdB point, and the decay changes to sustain when the sustain level is reached. Release begins when 
at the Key-OFF point. The effects of total level, level key scaling, and amplitude modulation are added 
to the envelope generator for changeing the shape of the envelope. , 


Fig. 3-2 Envelope Waveform 


21 


3-4 Operator (OP) and Accumulator (ACC) 


The operator is a circuit for FM calculation. The operator calculates the SIN value based upon 
the phase output from the phase generator, and this is combined with the output of the envelope 
generator. If the result is the modulating wave, it is sent back to the input of the operator. If music, 
the output is sent to the accumulator. The data for feedback and connection controls this transfer. 

The accumulator accumulates the operator output for the various channels. The results of this 
calculation are converted to offset binary data consisting of a 10 bit mantissa section (including sign) 
and 3 bit exponent section. This data is output from the LSB as shown in Fig. 3-3. 


Dt D2 Ds Ian Ds ps D7 Ds 


‘SIGN 


Fig. 3-3 Output Timing 


Internal data of OPLH MO output data 
Sign 15 14 13:12 1 10 9 8? ¢ i aes 2 


w 
wa 
ifs) 
Ps) 
“A 
= 
é 
“> 
f--) 
~1 
a 
w 
a 
w 
i 
- 


: 
a 


ie ki e ee ee 


) 
l 


| 


icc. Ss 627 eee), EIIcSeeeee es! 


Fig. 3-4 Internal Data and Output Data 


N 
LN 


3-5 Status Information and Interrupt Signals 


The two timers of OPLII are capable of setting flags according to a set period. These flags can 
be read as status signals or interrupt signals. Thus, the load on the CPU can be reduced by using the 
timers as tempo counters or for generating keyboard scanning signals. The interrupt signals have an 
open drain allowing for linking to other chips. 


Status signal 


Ds (Timer 2 FLAG) : Flag signal set by Timer 2. Set to “1” when Timer 2 reaches the set time. 
This data remains until reset. 


De (Timer 1 FLAG) : Same operation as Ds for Timer 1. 


D7 (IRQ) : Set to “1” when either Ds or De is “1”. 


23 


CPU 


CPU 


Preamp 


a 4.7pF 


1.8KQ 


28D655 


Fig. 4-2 Audio Interface 


43 Interface to Microprocessor/Microcomputer 


Do~D7 of OPLH is a bidirectional bus allowing for an interface to a microprocessor. Address 
data and status information is passed between the two devices over this bus. CS, RD. WR, and AO 
are bus control signals for managing the transferred data. This allows for creation of an FM sound 
generation system using the smallest configuration of the OPLII, memory, and a microprocessor. 


Data bus 


Control 
1/0 control 
signals 


Fig. 4-3 Interface to CPU 


25 


2 AANA li 


5, Creation of Music 


This chapter deals with the data which can be input to the registers of the OPLII for creating piano 
or brass instrument music. 


5-4 Concept of Sound Creation 


The basic concept behind FM sound generation is to first fully understand the characteristics of 
the desired instrument. For example, the envelope of piano sounds is such that there is a sharp attack 
when the keys are pressed, and then the sound gradually disappears as the key is held down. There 
are also a large number of harmonic overtones during the attack with this number decreasing over 
time until a nearly constant harmonic configuration is attained. After such characteristics are un- 
derstood, the means of attaining this sound through FM sound generation can be considered. The 
output amplitude can be determined from the envelope characteristics with the harmonic structure 
determining the modulation exponent. As this structure of harmonic overtones is related to the fre- 
quency of the operator, the frequency ratios can also be determined to a certain degree. In this manner, 
the characteristics of the desired sound roughly determine the FM parameters. Then, the various 
parameters are adjusted while listening to the sound, until the desired voice is obtained. 


5-2 Basics of Sound Creation 


FM sound generation uses effects obtained by using a modulator to modulate the carrier. Thus, 
the pitch, tone, and level of the music can be determined by skillful manipulation of the basic FM 
parameters (carrier output level, modulator output level, feedback level of modulator, frequency of 
cartier, and frequency of modulator). The relationship between these parameters and the parameters 
of the OPLII is shown in Table 5-1. 


i) FM connection (CONNECTION = “0”) 
All of the FM characteristics shown in Table 5-1 can be expressed. As operator 1 is equipped 
for self-feedback, combination with operator 2 allows for a two stage FM connection for high 
harmonic output. 


ii) Parallel connection (CONNECTION = ay 
The sum of the two operators is obtained with operator 2 always generating a sine wave. Thus, 
harmonically shifting the frequency of the two operators allows for effects such as the coupler 
effect of a pipe organ. In addition, operator 1 is equipped with the same feedback capabilities 
as described above for the output of higher harmonics. 


5-3 Example of Sound Creation 


Table 5-1 Basics of Sound Creation 


[item Applicable parameters MIN —(change in sound)~MAX 


Output level of carrier TOTAL LEVEL Min, level -————~ Max. level 
Data for A, D, $, and ae f 
Output level of modulator Key Scale data Round sound ~——- Bright sound 


harp fone 
Feedback level of modulator a. ee Normal tone~———~>_ (Noise) 


Frequency of carrier MULTI Low pitch--_—— + High pitch 
| Frequency of modulator (BLOCK/F-Number) Near harmonics ~-Far harmonics 


26 


ee | 


i) 
(i) 


(2) 


(3) 


(4) 


(5) 


(6) 


ii) 
() 


(2) 
(3) 


(4) 


(5) 


Electric Piano 


Selection of connection 
The connection is set to “0”. Almost all voices can be obtained from this connection. This 
allows for both accenting on the attack of operator 1 and for rich high harmonics. 


Determining the frequency for operators . 
The MULTIPLE for both operators are set to “1” in order to obtain higher harmonic frequencies 
which are integer multiples. 


Output level of operators 

The output of the modulator is altered to adjust the tone- When determining the level for 
operator 1, the bass is first set so that the sound is like a piano with a rich range of higher 
harmonic frequencies, and then the change in the treble is adjusted by level scaling for operator 
1. Level scaling for the treble is required until the output is almost a sine wave. 


EG setting 

The next step is to determine the envelope for level and timbre. First, operator is set for an 
envelope which provides a sharp attack but a relatively prolonged sound. Operator 1 which 
forms the modulator is set so that there are a great number of harmonic overtones during the 
attack followed by a constant timbre with no changes. Key scaling is also used for operator 
2 to provide level adjustment. Rate scaling of the treble should be used for a sharp sound. 


Readjustment of data 

The procedure for sound creation is nearly complete. The timbre can be altered to a certain 
degree by the envelope generator settings, etc. Here, the output level of the operator and the 
feedback level are readjusted to touch up the sound. For example, if you feel that the metallic 
echo is too strong, the level of operator 1 can be reduced. 


Adding effects 

Finally, a tremolo effect is added using the LFO to create a sound which is like an electric 
piano. This can be done using the amplitude modulation (AM) function of the OPLI, or by 
programming the total level to be updated at a period of 2 ~6Hz (use of a triangular wave is 
possible). 


Trumpet 


Selection of connection 
The connection for brass instruments is also “0”. The bold brass sound of a trumpet can be 
created by adjusting the feedback level of operator 1. 


Operator output 
The total level for operator 1 (modulator) is set to 4 moderate value in the range of $10 to 
$28. The feedback level should be set to the maximum level of 7 for bright reverberation. 


Frequency of operators 

Basically, both operators should be set to a multiple of 1. 

EG 

There should a slow attack for both operators. For brass sounds, the attack of the modulator 
comes completely after the attack of the carrier. This allows for the characteristics attack of 
brass instruments to be captured. 

Key scaling 

Clarity will be lacking in the treble due to the slow attack of the envelope. Slight rate scaling 
is needed to prevent an unnatural sound when playing fast passages. 


27 


(6) LFO 
No matter how well a brass instrument is played, the pitch will quiver during long tones. A 
vibrato effect should be added to express this. 


5-4 Creation of Rhythm Sounds 


Rhythm sounds are created using channels 7, 8, and 9. These three channels (6 slots) can be used 
to create a total of five sounds. The bass drum (BD), however, uses two slots for generation of FM 
sounds. Thus, a bass drum sound can be created using the same basic procedure as described in 
(a)~(c). This explanation will deal only with the remaining four sounds: high hat, top cymbal, tom 
tom, and snare drum. 

The OPLII is equipped with a noise generator which allows for combining a number of frequencies 
and a white noise generator for creating rhythm instruments. This noise generator uses 8 and 9 channel 
frequency information (Block/F-Number/Multi), the proper phase output for various rhythm in- 
struments is output by combining this signal with white noise. The resultant signal is sent to the 
operators. Experience has shown that the best ratio for the two set frequencies is 3: 1 (f?7ch = 
3*f8ch). So far, the phase data for the various instruments has been obtained. Finally, envelope in- 
formation is combined with this output. As the envelope is set for one slot which corresponds to a 
single rhythm instrument, values which express the characteristics of the instrument are set in the 
parameter registers, in the same manner as melody instruments. (Refer to 3-1-10). 

The above allows for the generation of various rhythm sounds. 


28 


6. Electrical Characteristics 


1. Absolute Maximum Ratings 


Pin voltage 
Operating ambient temperature 
Storage temperature 


2. Recommended Operating Conditions 


Fripiet aio 
5.5 


0 


Address hold time 


Chip select write width cS 

Chip select read width cs 

z 
Write data setup time 

Write data hold time 

Read pulse width 


Read data access time 
Read data hold time 


Output rise time 


Output fal! time 


Reset puise width 


Kfe 


i Fig. A-I Clock Timing 


Fig, A-2. Write Timing 


Do~ D7 


Fig. A-3 Read Timing 


30 


4, Timing Diagrams (Timing is based upon settings of Vin =2.0V and ViL=9.8V) 


Note: fcsw, tww and twou are based on either 
C5 or WR being driven to high level. 


Note: tacc is based on whichever of CS or RD 
goes to the low level jast. 
tcsr, trw and trpu are based on either CS 
or RD being driven to high level. 


oM 


tor tor tor2 


Fig. A-4 6M and oSY Fig. A-5 0M and SH-MO 


Fig. A-6 Reset Pulse 


31 


g. Package Dimensions 


(1) YM3812 


Notch or i-pin index mark 


(2) YM3812-F 


2,00+0.15 


B.40+0.20 


11.B80+0.40 


x 
< 
= 
° 
oe 
a 


0.10+6.10 


DIMENSIONS IN MM 


32